#!/usr/bin/python3

from stuckpredicate import StuckPredicate

def calculate_earning_range(stuck_predicate):
    #invest_ratio = [(0,100,0),(0,90,10),(10,80,10),(20,70,10), (30,60,10), (40,50,10),(50,40,10)]
    invest_ratio = [(0,100,0),(0,90,10),(0,80,20),(0,70,30),(0,60,40),
                    (0,50,50),(0,40,60),(0,30,70),(0,20,80),(0,10,90),(0,0,100)]
    for i in range(len(invest_ratio)):
        lower = stuck_predicate.pessimism(*(invest_ratio[i]))
        upper = stuck_predicate.optimism(*(invest_ratio[i]))
        print(invest_ratio[i], ': (%.1f, %.1f)' %(lower, upper))

predicate = StuckPredicate()
calculate_earning_range(predicate)    
